<div class="form">

<?php $form=$this->beginWidget('CActiveForm', array(
	'id'=>'user-form',
	'enableAjaxValidation'=>false,
    'htmlOptions'=>array(
        'enctype'=>'multipart/form-data',
    ),
)); ?>

	<p class="note">Fields with <span class="required">*</span> are required.</p>

	<?php echo $form->errorSummary($model); ?>

	<div class="row">
		<?php echo $form->labelEx($model,'username', array('class'=>'label')); ?>
		<?php echo $form->textField($model,'username',array('size'=>60,'maxlength'=>128, 'class'=>'txt')); ?>
		<?php echo $form->error($model,'username'); ?>
	</div>

	<div class="row">
		<?php echo $form->labelEx($model,'password', array('class'=>'label')); ?>
		<?php echo $form->passwordField($model,'password',array('size'=>60,'maxlength'=>128, 'class'=>'txt')); ?>
		<?php echo $form->error($model,'password'); ?>
	</div>

	<div class="row">
		<?php echo $form->labelEx($model,'password_repeat', array('class'=>'label')); ?>
		<?php echo $form->passwordField($model,'password_repeat',array('size'=>60,'maxlength'=>128, 'class'=>'txt')); ?>
		<?php echo $form->error($model,'password_repeat'); ?>
	</div>
	
	<div class="row">
		<?php echo $form->labelEx($model,'email', array('class'=>'label')); ?>
		<?php echo $form->textField($model,'email',array('size'=>60,'maxlength'=>128, 'class'=>'txt')); ?>
		<?php echo $form->error($model,'email'); ?>
	</div>
    
    <div class="row">
		<?php echo $form->labelEx($model,'avatar', array('class'=>'label')); ?>
		<?php echo $form->hiddenField($model,'avatar'); ?>
        <div class="swfupload-wrap">
            <span id="swfupload"></span>
        </div>
        <div id="divFileProgressContainer"></div>
        <div id="thumbnails"></div>
		<?php echo $form->error($model,'avatar'); ?>
	</div>

	<div class="row">
		<?php echo $form->labelEx($model,'profile', array('class'=>'label')); ?>
		<?php echo $form->textArea($model,'profile',array('rows'=>6, 'cols'=>50, 'class'=>'txt')); ?>
		<?php echo $form->error($model,'profile'); ?>
	</div>

	<div class="row buttons">
		<?php echo CHtml::submitButton($model->isNewRecord ? 'Create' : 'Save', array('class'=>'btn-default btn-light')); ?>
	</div>

<?php $this->endWidget(); ?>

</div><!-- form -->
